import { http } from "@/utils/http";
import { baseUrlApi } from "@/api/utils";
/*积分商城-列表*/
export const queryGoodsList = (params?) => {
  return http.request("get", baseUrlApi("shop/goodsList"), {
    params
  });
};
/*积分商城-商品信息-添加*/
export const addGoods = async (data?: object) => {
  return http.request("post", baseUrlApi("shop/add"), { data });
};
/*积分商城-商品信息- 编辑*/
export const updateGoods = async (data?: object) => {
  return http.request("post", baseUrlApi("shop/update"), { data });
};
/*积分商城-上架*/
export const onshelf = (params?) => {
  return http.request("get", baseUrlApi("shop/onshelf"), { params });
};
/*积分商城-下架*/
export const unshelf = (params?) => {
  return http.request("get", baseUrlApi("shop/unshelf"), { params });
};
/*积分商城-删除*/
export const deleteShop = (params?) => {
  return http.request("get", baseUrlApi("shop/delete"), { params });
};
/*兑换记录 -列表*/
export const queryExchangeList = (params?) => {
  return http.request("get", baseUrlApi("shop/exchangeList"), {
    params
  });
};
/*立即兑换*/
export const handleExchange = (params?) => {
  return http.request("get", baseUrlApi("shop/exchange"), { params });
}